Skip to content

Fix godoc formatting for all exported identifiers in symbolic package#32

Merged
kwesiRutledge merged 71 commits intomainfrom
copilot/update-symbolic-package-docs
Mar 9, 2026
Merged

Fix godoc formatting for all exported identifiers in symbolic package#32
kwesiRutledge merged 71 commits intomainfrom
copilot/update-symbolic-package-docs

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

All doc comments in the symbolic package used a non-standard /* Name\nDescription:\n text\n*/ block style that violated godoc conventions — specifically, comments must begin with the name of the declared identifier.

Changes

  • Converted 405 block comments from /* Description: ... */ to // Name ... godoc format across all 28 files in symbolic/
  • Added missing doc comments for exported types and functions that had none (BasicEnvironment, KMatrix, Constraint, Environment, etc.)
  • Replaced ... placeholder comments with meaningful descriptions (Dims, Transpose, IsConstraint, ToExpression, VectorMultiplyTemplate, Copy, ScaleBy, and others)
  • Fixed one incorrect comment in matrix_constraint.go where At() referred to a "vector" constraint instead of "matrix" constraint

Before / After

// Before
/*
Check
Description:

    Checks to make sure that the constant is initialized properly.
    Constants are always initialized properly, so this should always return no error.
*/
func (c K) Check() error { ... }

// After
// Check verifies that the constant is initialized properly.
// Constants are always initialized properly, so this should always return no error.
func (c K) Check() error { ... }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 22, 2026 03:59
- Convert block-style /* ... */ doc comments to // style godoc comments
- Ensure all doc comments start with the exported identifier name
- Add missing doc comments for exported types with no documentation
- Remove blank lines between doc comments and declarations
- Fix various grammar and naming issues in comments

Fixes 405 golint documentation warnings (0 remaining).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: kwesiRutledge <9002730+kwesiRutledge@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation comments for symbolic package Fix godoc formatting for all exported identifiers in symbolic package Feb 22, 2026
Copilot AI requested a review from kwesiRutledge February 22, 2026 04:05
Copy link
Collaborator

@kwesiRutledge kwesiRutledge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review; slowly working through the full set of comments.


This function subtracts the current expression from another and returns the resulting expression.
*/
// Minus This function subtracts the current expression from another and returns the resulting expression.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo? In this case, we subtract another expression from the current one.

*/
// Check Checks to make sure that the constant is initialized properly.
// ConstantMatrix objects are always initialized properly, so this should always return
// no error.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are they? I think we should instead check the dimensions of each row to make sure that they match...

@kwesiRutledge kwesiRutledge marked this pull request as ready for review March 9, 2026 02:53
@kwesiRutledge kwesiRutledge merged commit 1c246d5 into main Mar 9, 2026
5 checks passed
@kwesiRutledge kwesiRutledge deleted the copilot/update-symbolic-package-docs branch March 9, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants